define(["app"],
        function (app) {
            return app.run([
                    '$rootScope',
                    '$state',
                    '$stateParams',
                    function ($rootScope, $state, $stateParams) {
                        $rootScope.$state = $state;
                        $rootScope.$stateParams = $stateParams

                    }
                ])
                .config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
                  //用于改变state时跳至顶部
                    // $uiViewScrollProvider.useAnchorScroll();
                    $locationProvider.html5Mode(true);
                    // 默认进入先重定向
                    var accordtionState = {
                        name : 'home',
                        url : '/home',
                        templateUrl:'./App/views/home.html'
                    }
                    // 容器管理模板
                    var containerState = {
                        name : 'about',
                        url : '/about',
                        template: 'about界面张盼盼'
                    }
                    $urlRouterProvider.otherwise('/home');
                    $stateProvider.state(accordtionState);
                    $stateProvider.state(containerState);

                })
        })
